package algorithm.loadbalance;

import java.util.*;

public class ServerInfo {
    public static LinkedHashMap<String,Integer> serverMap = new LinkedHashMap<>();
    public static List<String> serverList = new ArrayList<>();
    static{
        serverMap.put("192.168.1.111",1);
        serverMap.put("192.168.1.112",2);
        serverMap.put("192.168.1.113",2);
        serverMap.put("192.168.1.114",5);
        serverMap.put("192.168.1.115",5);
        serverMap.put("192.168.1.116",7);
        serverMap.put("192.168.1.117",7);
        // 需要保证顺序从小到大，如果用hashMap不太好排序，可以List<自定义服务节点对象>
        for (String ip : serverMap.keySet()) {
            serverList.add(ip);
        }
    }
}
